package com.zhike.b2b.task;

import java.io.PrintStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Timer;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.http.HttpServlet;

public class PublishPageListener extends HttpServlet
{
  private static final long serialVersionUID = 7065236947173387428L;
  private static Timer timer;

  public void contextDestroyed(ServletContextEvent paramServletContextEvent)
  {
    timer.cancel();
  }
/*
  public void contextInitialized(ServletContextEvent paramServletContextEvent)
  {
    if (timer == null)
    {
      timer = new Timer("PublishPageListener");
      JDBCExceute localJDBCExceute = new JDBCExceute();
      String str1 = "select param_value from site_parameter where param_id=100000000000057";
      ArrayList localArrayList = new ArrayList();
      localArrayList = localJDBCExceute.excute(str1);
      String str2 = "";
      if ((localArrayList != null) && (localArrayList.size() > 0))
        for (int i = 0; i < localArrayList.size(); i++)
        {
          HashMap localHashMap = (HashMap)localArrayList.get(i);
          if (localHashMap.get("param_value") == null)
            continue;
          str2 = localHashMap.get("param_value").toString();
        }
      long l = 3000L;
      if (!str2.equals(""))
        l = new Long(str2).longValue();
     
      timer.schedule(new PublishPageByInterval(), 30000L, l);
    }
  }*/
}

